package com.mj.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.mj.fragment.Fragment_Info;
import com.mj.fragment.Fragment_Pic;
import com.mj.fragment.PlaceholderFragment;

/***
 * 美女房间TAG切换适配器
 * 
 * @author Duan
 * 
 */
public class DetailPagerAdapter extends FragmentPagerAdapter {
	Fragment_Pic fragment_Pic;

	public DetailPagerAdapter(FragmentManager fm) {
		super(fm);
		fragment_Pic = new Fragment_Pic();
	}

	@Override
	public Fragment getItem(int position) {
		switch (position) {
		case 0:
			return new Fragment_Info();
		case 1:
			return fragment_Pic;
		default:
			return PlaceholderFragment.newInstance(position);
		}
	}

	@Override
	public int getCount() {
		return 3;
	}
}
